//获取url请求参数
function getParam(){
	var searchSplited = location.search.slice(1).split(/[\=\&]/);
	var params = {};
	for(var i = 0; i < searchSplited.length -1 ; i +=2){
		var key = searchSplited[i];
		var value = searchSplited[i+1];
		params[key] = value;
	}
	return params;
}

//32位随机字符串
function random32Str(){  
    var chars = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'];  
    var str="";  
    for(var i=0;i<32;i++){  
        var id = parseInt(Math.random()*61);  
        str+=chars[id];  
    }  
    return str;  
}

function alertMsg(message){
	layer.open({
	    content: message,
	    skin: 'msg',
	    time: 2
	  });
}

function jsonToObj(json){
	return eval('(' + json + ')');
}
//去除所有空格
function Trim(str){
    var result;
    result = str.replace(/(^\s+)|(\s+$)/g,"");
    result = result.replace(/\s/g,"");
    return result;
}